package com.lemo.smart.bean;

import org.apache.commons.collections.map.HashedMap;

import java.util.Map;

/**
 * 返回视图对象
 * Created by 罗选通 on 2017/12/22.
 */
public class View {

  /**
   * 视图路径
   */
  private String path;

  /**
   * 模拟数据
   */
  private Map<String, Object> model;

  public View(String path) {
    this.path = path;
  }

  public View addModel(String key, String value) {
    if (model == null) {
      model = new HashedMap();
    }
    model.put(key, value);
    return this;
  }

  public String getPath() {
    return path;
  }


  public Map<String, Object> getModel() {
    return model;
  }


}
